﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace CheryABP.SystemSetting.MeneRoleAPI.Dto
{
    /// <summary>
    /// 创建、编辑角色信息实体输入
    /// </summary>
    [AutoMapTo(typeof(SystemSetitng.system_role))]
    public class RoleDtoInput : EntityDto<int>
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        [Required]
        [StringLength(30)]
       
        public string role_name { get; set; }
        /// <summary>
        /// 备注，选填
        /// </summary>
        public string memo { get; set; }
        /// <summary>
        /// 角色类型 0超管，1系统管理员
        /// </summary>
        [Required]
        public int role_type { get; set; }
        /// <summary>
        /// 菜单id集合，每个菜单id，对应的操作类型（Add,Edit,Delet,..）
        /// </summary>
        [Required]
        public List<Menu_Action> role_action_info{ get; set; }

        
    }
    /// <summary>
    /// 自定义实体
    /// </summary>
    public class Menu_Action
    {
        /// <summary>
        /// 菜单id集合
        /// </summary>
        public int menu_id { get; set; }
       /// <summary>
       /// 该菜单对应的操作类型
       /// </summary>
       public List<action> action { get; set; }
    }
    /// <summary>
    /// 
    /// </summary>
    public class action
    {
        /// <summary>
        /// add，edit，delete等操作类型
        /// </summary>
        [Required]
        public string action_type { get; set; }
    }
}
